﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<link rel="Stylesheet" type="text/css" media="screen" href="Screen.css" />
  <title>STP_MODE</title>
</head>
<body>
	<h3>STP_MODE</h3>
	<hr />
<pre>
struct STP_CALLBACKS
{
    void  (*enableLearning)        (BRIDGE* bridge, int portIndex, int treeIndex, bool enable);
    void  (*enableForwarding)      (BRIDGE* bridge, int portIndex, int treeIndex, bool enable);
    void* (*transmitGetBuffer)     (BRIDGE* bridge, int portIndex, unsigned int bpduSize);
    void  (*transmitReleaseBuffer) (BRIDGE* bridge, int portIndex);
    void  (*flushFdb)              (BRIDGE* bridge, int portIndex, int treeIndex);
    void* (*allocAndZeroMemory)    (unsigned long size);
    void  (*freeMemory)            (void* p);
    void  (*debugStrOut)           (BRIDGE* bridge, int portIndex, int treeIndex, const char* str);
};</pre>
	<h4>
		Summary</h4>
	<p>
		Structure containing pointers to application-defined STP callbacks. These callbacks 
		implement the hardware-specific and platform-specific functionality required by STP, such 
		as enabling forwarding on a physical port, or allocating memory, or displaying debug text 
		generated by the STP library.</p>
	<h4>
		Members</h4>
	<dl>
		<dt>enableLearning</dt>
		<dd>See <a href="StpCallback_EnableLearning.html">StpCallback_EnableLearning</a>.</dd>
		<dt>enableForwarding</dt>
		<dd>See <a href="StpCallback_EnableForwarding.html">StpCallback_EnableForwarding</a>.</dd>
		<dt>transmitGetBuffer</dt>
		<dd>See <a href="StpCallback_TransmitGetBuffer.html">StpCallback_TransmitGetBuffer</a>.</dd>
		<dt>transmitReleaseBuffer</dt>
		<dd>See <a href="StpCallback_TransmitReleaseBuffer.html">StpCallback_TransmitReleaseBuffer</a>.</dd>
		<dt>flushFdb</dt>
		<dd>See <a href="StpCallback_FlushFdb.html">StpCallback_FlushFdb</a>.</dd>
		<dt>allocAndZeroMemory</dt>
		<dd>See <a href="StpCallback_AllocAndZeroMemory.html">StpCallback_AllocAndZeroMemory</a>.</dd>
		<dt>freeMemory</dt>
		<dd>See <a href="StpCallback_FreeMemory.html">StpCallback_FreeMemory</a>.</dd>
		<dt>debugStrOut</dt>
		<dd>See <a href="StpCallback_DebugStrOut.html">StpCallback_DebugStrOut</a>.</dd>
	</dl>
	<h4>
		Remarks</h4>
		<p>
			When a bridge is created via <a href="STP_CreateBridge.html">STP_CreateBridge</a>, the STP library retains a pointer to this 
			structure (not its content), so the structure address and its content must remain valid 
			for the lifetime of the bridge.</p>
	<p>
			STP library functions must not be called from within these callbacks. There is no reason 
			to do so.</p>
	
</body>
</html>
